<?php
// +----------------------------------------------------------------------
// | Longbing [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright Chengdu longbing Technology Co., Ltd.
// +----------------------------------------------------------------------
// | Website http://longbing.org/
// +----------------------------------------------------------------------
// | Sales manager: +86-13558882532 / +86-13330887474
// | Technical support: +86-15680635005
// | After-sale service: +86-17361005938
// +----------------------------------------------------------------------

declare(strict_types=1);

namespace app\appstore\controller;


use app\AdminRest;
use longbingcore\permissions\AdminMenu;
use think\App;

class Admin extends AdminRest
{
    // 继承 验证用户登陆
    public function __construct ( App $app )
    {
        parent::__construct( $app );
    }
    //插件权限列表
    public function getPluginAuth()
    {
        $pluginAuth = longbingGetPluginAuth($this->_uniacid);
        return $this->success($pluginAuth);
    }

    /**
     * 获得插件列表
     *
     * @return \think\Response
     * @author shuixian
     * @DataTime: 2019/12/16 10:43
     */
    public function getPlugList(){

        //需要过滤权限
        $dataList = AdminMenu::getAppstoreInfoList($this->_uniacid);

        $dataList = longbing_array_columns($dataList,['name','title','desc','icon','appUrl']);

        return $this->success( $dataList );
    }


}